package com.koron.car.web.authorized.service;

import com.koron.bean.workflow.RedirectQuery;
import com.koron.car.web.authorized.bean.entity.DelimitApply;
import com.koron.car.web.authorized.bean.query.DelimitApplyQuery;
import com.koron.car.web.authorized.bean.vo.DelimitApplyVO;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;

/**
 * (DelimitApply)表服务接口
 *
 * @author twcao
 * @since 2022-03-31 11:24:55
 */
public interface DelimitApplyService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    DelimitApplyVO queryById(SessionFactory factory, String id);

    /**
     * 查询多条数据
     * @param query 查询条件
     * @return 对象列表
     */
    List<DelimitApply> queryList(SessionFactory factory, DelimitApplyQuery query);

    DelimitApplyVO saveOrUpdate(SessionFactory factory, DelimitApplyVO apply);

    /**
     * 新增数据
     *
     * @param apply 实例对象
     * @return 实例对象
     */
    DelimitApply insert(SessionFactory factory, DelimitApply apply);

    /**
     * 修改数据
     *
     * @param apply 实例对象
     * @return 实例对象
     */
    DelimitApply update(SessionFactory factory, DelimitApply apply);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(SessionFactory factory, String id);

    /**
     * 工作流更新
     * @param factory
     * @param redirectQuery
     */
    Boolean workflowUpdate(SessionFactory factory, RedirectQuery redirectQuery);

    /**
     * 审核完成
     * @param factory
     * @param detail
     * @return
     */
    DelimitApplyVO auditFinish(SessionFactory factory, DelimitApplyVO detail);

}
